import {CityBaseItem} from './cityBase';
import {CoachItem, CoachPriceItem} from './coach';


export interface MyCoachItem {
  id: number;
  runtime: number;
  coach: CoachItem;
  status: number;
  created_at: string;
  city_base: CityBaseItem;
  price: CoachPriceItem;
}

export interface StudentRecordItem {
  id?: number;
  city: string;
  student_id?: number;
  coach_id: number;
  base_id: number;
  start_time?: string;
  end_time?: string;
  status?: number;
  create_time?: string;
  update_time?: string;
}

export interface MyApplyItem {
  id: number;
  has_data: boolean;
  coach_id: number;
  created_at: string;
  base_id: number;
  coach_name: string;
  coach_avatar: string;
  coach_gender: string;
  base_name: string;
  base_address: string;
  price_name: string; // 价格名称
  price: number; // 价格
  price_id: number; // 价格id
  name: string;
  card: string;
  phone: string;
  license: string;
  city: string[];
  region: string;
  price_license: string;
}


export interface MyPriceItem {
  id: number;
  coach_id: number;
  coach_name: string;
  status: number;
  created_at: string;
  product_id: number;
  order_id: number;
}

export interface CarProgressStepItem {
  id: number;
  category: number;
  step: number;
  name: string;
  status: number;
  completed_time: string;
  totalProcess: number;
  created_at: string;
  guide: string;
  has_child: number;
  children: string[];
}


export interface UserProgressStepItem {
  id: number;
  name: string;
  city: number[];
  step_id: number;
  status: number;
  children: string;
  created_at: string;
}


export interface ProcessStepImageItem {
  id: number;
  name: string;
  image: string;
}


export interface DriverHospitalItem {
  id: number;
  city_id: number;
  name: string;
  address: string;
  phone: string;
  worktime: string;
}

export interface UserSubjectScore {
  subject_id: number;
  score: number;
  update_time: string;
}

export interface UserScoreQrCode {
  id: number;
  status: number;
  code: string;
  sn: string;
  update_time: string;
}

export interface UserScoreVideoItem {
  id: number;
  url: string;
  cover: string;
}

export interface UserSubjectScoreItem {
  score: UserSubjectScore[];
  price: {
    price_id: number; 
    price: number; 
    name: string
  }, 
  total: number;
  num: number;
  video: UserScoreVideoItem[];
  status: number;
  qrcode: UserScoreQrCode[]
}

interface UploadFile {
  name:string;
  percent:number;
  status:string;
  thumbUrl:string;
  uid:string;
  url:string;
}


export interface FileItem extends UploadFile {
    url: string;
    cover: string;
    isSaved: boolean;
}

export interface CarProgressStatisticsItem {
  total: number;
  completed: number;
  subjects: {
      name: string;
      total: number;
      status: number;
      completed: number;
      steps: number[];
  }[];
}

export interface CarProgressResponseItem {
  [key: string]: CarProgressStepItem;
}

export interface carProgressTotalItem {
  'completed': number,
  'total': number,
  'percent': number
}
